/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package hotgammon.domain.game.dice;

/**
 *
 * @author truck
 */
public class RandomDiceStrategy implements DiceStrategy{

    public int[] throwDice() {
       int[] dice;
       int a = (int) (((Math.random() * 6)) + 1);
       int b = (int) (((Math.random() * 6)) + 1);
       if(a == b){
           dice = new int[4];
           dice[2] = a;
           dice[3] = a;
       }else{
           dice = new int[2];
       }
       dice[0] = a;
       dice[1] = b;
       return dice;
    }

}
